#!/usr/bin/python
#-*- coding: utf-8 -*-



import sys
reload(sys)
sys.setdefaultencoding('utf8')

import remote

class Online(object):
	def __init__(self):
		self.projects = {
			'CloudSplus':'/usr/share/nginx/html'
		}
		self.ips = ['192.168.100.50','192.168.100.51','192.168.100.52']

	def start(self,project):
		r = remote.Remote()
		command = 'cd {path};git pull'.format(path=self.projects[project])
		result = r.runs(info=self.ips,command=command)
		return result

if __name__ == '__main__':
	o = Online()
	print o.start('CloudSplus')

